package com.yanmaohu.yulia.bean;

/**
 * @author Bright Lee
 */
public final class DatetimeType implements PredefinedType {

    private int beginIndex;
    private int endIndex;
    private boolean date;
    private boolean time;
    private boolean timestamp;
    private UnsignedInteger precision;
    private boolean withTimeZone;
    private boolean withoutTimeZone;

    public DatetimeType(int beginIndex,
                        int endIndex,
                        boolean date,
                        boolean time,
                        boolean timestamp,
                        UnsignedInteger precision,
                        boolean withTimeZone,
                        boolean withoutTimeZone) {
        this.beginIndex = beginIndex;
        this.endIndex = endIndex;
        this.date = date;
        this.time = time;
        this.timestamp = timestamp;
        this.precision = precision;
        this.withTimeZone = withTimeZone;
        this.withoutTimeZone = withoutTimeZone;
    }

    @Override
    public int getBeginIndex() {
        return beginIndex;
    }

    @Override
    public int getEndIndex() {
        return endIndex;
    }

    public boolean isDate() {
        return date;
    }

    public boolean isTime() {
        return time;
    }

    public boolean isTimestamp() {
        return timestamp;
    }

    public UnsignedInteger getPrecision() {
        return precision;
    }

    public boolean isWithTimeZone() {
        return withTimeZone;
    }

    public boolean isWithoutTimeZone() {
        return withoutTimeZone;
    }

}
